package com.maxd.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单合伙人信息表
 */
@Entity
@Getter
@Setter
@ApiModel("合伙人信息表")
@Table(name = "order_partner_info")
@DynamicInsert
@DynamicUpdate
public class OrderPartnerInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @ApiModelProperty("自增主键")
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    @ApiModelProperty("订单号")
    @Column(name = "order_id", nullable = false)
    private String orderId;

    @ApiModelProperty("下单人用户id")
    @Column(name = "user_id", nullable = false)
    private Long userId;

    @ApiModelProperty("状态 0-待生效(待支付) 1-已生效 2-取消(未支付取消) 3-作废(如退款的情况)")
    @Column(name = "status", nullable = false)
    private String status;

    @ApiModelProperty("合伙人商品ID")
    @Column(name = "partner_code", nullable = false)
    private Long partnerCode;

    @ApiModelProperty("合伙人头衔")
    @Column(name = "partner_title", nullable = false)
    private String partnerTitle;

    @ApiModelProperty("合伙人用户id")
    @Column(name = "partner_user_id", nullable = false)
    private Long partnerUserId;

    @ApiModelProperty("'合伙人商品分类ID")
    @Column(name = "partner_type_id", nullable = false)
    private Long partnerTypeId;

    @ApiModelProperty("价格")
    @Column(name = "price", nullable = false)
    private BigDecimal price;

    @ApiModelProperty("'支付金额")
    @Column(name = "pay_money", nullable = false)
    private BigDecimal payMoney;

    @ApiModelProperty("'抵扣积分数")
    @Column(name = "deduct_point", nullable = false)
    private BigDecimal deductPoint;

    @ApiModelProperty("'抵扣比例")
    @Column(name = "deduct_percent", nullable = false)
    private BigDecimal deductPercent;

    @ApiModelProperty("用户姓名")
    @Column(name = "user_name")
    private String userName;

    @ApiModelProperty("联系电话")
    @Column(name = "telephone")
    private String telephone;

    @ApiModelProperty("省份编码")
    @Column(name = "province_code")
    private String provinceCode;

    @ApiModelProperty("省份名称")
    @Column(name = "province_name")
    private String provinceName;

    @ApiModelProperty("城市编码")
    @Column(name = "city_code")
    private String cityCode;

    @ApiModelProperty("城市名称")
    @Column(name = "city_name")
    private String cityName;

    @ApiModelProperty("区县编码")
    @Column(name = "county_code")
    private String countyCode;

    @ApiModelProperty("区县名称")
    @Column(name = "county_name")
    private String countyName;

    @ApiModelProperty("详细地址")
    @Column(name = "address_detail")
    private String addressDetail;

    @Column(name = "arm_classes")
    @ApiModelProperty("兵种，教官必填")
    private String armClasses;

    @ApiModelProperty("特长，教官必填")
    @Column(name = "special_skill")
    private String specialSkill;

    @Column(name = "serve_date")
    @ApiModelProperty("服役时间，教官必填")
    private String serveDate;

    @ApiModelProperty("退役时间，教官必填")
    @Column(name = "retirement_date")
    private String retirementDate;

    @Column(name = "prizes")
    @ApiModelProperty("奖项列表，教官必填，格式为json格式的列表")
    private String prizes;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time", nullable = false)
    private Date createTime;

    @ApiModelProperty("更新时间")
    @Column(name = "update_time", nullable = false)
    private Date updateTime;

    @ApiModelProperty("创建人")
    @Column(name = "create_by")
    private String createBy;

    @ApiModelProperty("更新人")
    @Column(name = "update_by")
    private String updateBy;

}
